Articles in this section
Category / Section

How to customize the drill icon in a JavaScript Pivot Table?

2 mins read

This article explains how to customize the drill icon in the JavaScript Pivot Table.

Customizing the drill icon

The drill icon in a pivot table is a visual indicator that shows whether a row or column can be expanded or collapsed. In some situations, you might want to customize this drill icon to personalize the UI appearance and improve the presentation of your data. To achieve this, you can target the built-in CSS classes associated with the pivot table drill icon.

Below is the CSS code snippet that can be used to customize the expand and collapse icons in a pivot table:

[index.css]

      .e-pivotview .e-expand::before {
        content: "\e22c" !important
      }
      .e-pivotview .e-collapse::before {
        content: "\e22b" !important
      }

In the code snippet above, we have targeted the .e-pivotview .e-expand class for the expand icon, whereas the .e-pivotview .e-collapse class for the collapse icon. Subsequently, we have used the content property to incorporate the Unicode characters for assigning new icons. The Unicode character \e22c (i.e., (+) sign) is used for the expand icon, and \e22b (i.e., (-) sign) is used for the collapse icon. You can replace these characters with other Unicode characters from our Syncfusion Icons library to meet your specific requirements.

The following GIF image, which portrays the results of the code snippet mentioned above,

GIF

customize-drill-icon.gif

For a practical demonstration, refer to the sample of stackblitz.

Conclusion:
I hope you enjoyed learning how to customize the drill icon in the Pivot Table.

You can also refer to our JavaScript Pivot Table feature tour page to learn about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our JavaScript Pivot Table example to understand how to create and manipulate data.

For current customers, you can check out our components on the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, support portal, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied